/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.util.ObjectUtil
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.control.RadioButton
 *  javafx.scene.layout.AnchorPane
 *  javafx.stage.Modality
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.replenish;

import cn.hutool.core.util.ObjectUtil;
import com.gys.GysApplication;
import com.gys.common.util.ConstUtil;
import com.gys.controller.BaseController;
import com.gys.controller.index.IndexController;
import com.gys.controller.replenish.AddReplenishController;
import com.gys.controller.replenish.ReplenishController;
import com.gys.view.replenish.AddTipView;
import com.gys.view.replenish.AddView;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.RadioButton;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Modality;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class AddTypeReplenishController
extends BaseController
implements Initializable {
    private final int pageSize = ConstUtil.DEFAULT_PAGESIZE;
    private final int defaultPageCount = ConstUtil.DEFAULT_PAGECOUNT;
    @FXML
    private AnchorPane pane;
    @FXML
    private RadioButton typeOne;
    @FXML
    private RadioButton typeTwo;
    @Autowired
    private ReplenishController acceptController;
    @Autowired
    private IndexController indexController;
    @Autowired
    private AddReplenishController addReplenishController;
    public String type = "";

    public void initialize(URL location, ResourceBundle resources) {
    }

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.pane)) {
            return;
        }
    }

    @FXML
    private void oneAction() {
        this.typeTwo.setSelected(false);
        this.type = this.typeOne.isSelected() ? "0" : "1";
    }

    @FXML
    private void twoAction() {
        this.typeOne.setSelected(false);
        this.type = this.typeTwo.isSelected() ? "1" : "0";
    }

    @FXML
    private void openAdd() {
        if ("0".equals(this.type)) {
            GysApplication.showView(AddTipView.class, (Modality)Modality.APPLICATION_MODAL);
        } else {
            this.addReplenishController.init();
            GysApplication.showView(AddView.class, (Modality)Modality.APPLICATION_MODAL);
        }
        this.pane.getScene().getWindow().hide();
    }

    @FXML
    private void closeWindows() {
        this.init();
        this.pane.getScene().getWindow().hide();
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public int getDefaultPageCount() {
        return this.defaultPageCount;
    }

    public AnchorPane getPane() {
        return this.pane;
    }

    public RadioButton getTypeOne() {
        return this.typeOne;
    }

    public RadioButton getTypeTwo() {
        return this.typeTwo;
    }

    public ReplenishController getAcceptController() {
        return this.acceptController;
    }

    public IndexController getIndexController() {
        return this.indexController;
    }

    public AddReplenishController getAddReplenishController() {
        return this.addReplenishController;
    }

    public String getType() {
        return this.type;
    }

    public void setPane(AnchorPane pane) {
        this.pane = pane;
    }

    public void setTypeOne(RadioButton typeOne) {
        this.typeOne = typeOne;
    }

    public void setTypeTwo(RadioButton typeTwo) {
        this.typeTwo = typeTwo;
    }

    public void setAcceptController(ReplenishController acceptController) {
        this.acceptController = acceptController;
    }

    public void setIndexController(IndexController indexController) {
        this.indexController = indexController;
    }

    public void setAddReplenishController(AddReplenishController addReplenishController) {
        this.addReplenishController = addReplenishController;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof AddTypeReplenishController)) {
            return false;
        }
        AddTypeReplenishController other = (AddTypeReplenishController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (this.getPageSize() != other.getPageSize()) {
            return false;
        }
        if (this.getDefaultPageCount() != other.getDefaultPageCount()) {
            return false;
        }
        AnchorPane this$pane = this.getPane();
        AnchorPane other$pane = other.getPane();
        if (this$pane == null ? other$pane != null : !this$pane.equals(other$pane)) {
            return false;
        }
        RadioButton this$typeOne = this.getTypeOne();
        RadioButton other$typeOne = other.getTypeOne();
        if (this$typeOne == null ? other$typeOne != null : !this$typeOne.equals(other$typeOne)) {
            return false;
        }
        RadioButton this$typeTwo = this.getTypeTwo();
        RadioButton other$typeTwo = other.getTypeTwo();
        if (this$typeTwo == null ? other$typeTwo != null : !this$typeTwo.equals(other$typeTwo)) {
            return false;
        }
        ReplenishController this$acceptController = this.getAcceptController();
        ReplenishController other$acceptController = other.getAcceptController();
        if (this$acceptController == null ? other$acceptController != null : !(this$acceptController).equals(other$acceptController)) {
            return false;
        }
        IndexController this$indexController = this.getIndexController();
        IndexController other$indexController = other.getIndexController();
        if (this$indexController == null ? other$indexController != null : !(this$indexController).equals(other$indexController)) {
            return false;
        }
        AddReplenishController this$addReplenishController = this.getAddReplenishController();
        AddReplenishController other$addReplenishController = other.getAddReplenishController();
        if (this$addReplenishController == null ? other$addReplenishController != null : !(this$addReplenishController).equals(other$addReplenishController)) {
            return false;
        }
        String this$type = this.getType();
        String other$type = other.getType();
        return !(this$type == null ? other$type != null : !this$type.equals(other$type));
    }

    protected boolean canEqual(Object other) {
        return other instanceof AddTypeReplenishController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        result = result * 59 + this.getPageSize();
        result = result * 59 + this.getDefaultPageCount();
        AnchorPane $pane = this.getPane();
        result = result * 59 + ($pane == null ? 43 : $pane.hashCode());
        RadioButton $typeOne = this.getTypeOne();
        result = result * 59 + ($typeOne == null ? 43 : $typeOne.hashCode());
        RadioButton $typeTwo = this.getTypeTwo();
        result = result * 59 + ($typeTwo == null ? 43 : $typeTwo.hashCode());
        ReplenishController $acceptController = this.getAcceptController();
        result = result * 59 + ($acceptController == null ? 43 : ($acceptController).hashCode());
        IndexController $indexController = this.getIndexController();
        result = result * 59 + ($indexController == null ? 43 : ($indexController).hashCode());
        AddReplenishController $addReplenishController = this.getAddReplenishController();
        result = result * 59 + ($addReplenishController == null ? 43 : ($addReplenishController).hashCode());
        String $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        return result;
    }

    public String toString() {
        return "AddTypeReplenishController(pageSize=" + this.getPageSize() + ", defaultPageCount=" + this.getDefaultPageCount() + ", pane=" + this.getPane() + ", typeOne=" + this.getTypeOne() + ", typeTwo=" + this.getTypeTwo() + ", acceptController=" + this.getAcceptController() + ", indexController=" + this.getIndexController() + ", addReplenishController=" + this.getAddReplenishController() + ", type=" + this.getType() + ")";
    }
}

